<template>
  <div>
    我的
    <van-divider />
    <van-button @click="onClick('light')">白天</van-button>
    <van-button @click="onClick('dark')">黑夜</van-button>
  </div>
</template>

<script>
import { mapMutations } from 'vuex'
export default {
  methods: {
    ...mapMutations(['set_dark_mode']),
    onClick(mode) {
      this.set_dark_mode(mode)
    },
  },
}
</script>

<style></style>
